<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('进度计划')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="gray-bg">

<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="region-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p style="width: 90px !important;">类型：</p>
                                <select id="reasonType" name="reasonType" class="form-control">
                                    <option value="">请选择</option>
                                    <option value="0">人</option>
                                    <option value="1">料</option>
                                    <option value="2">机</option>
                                    <option value="3">法</option>
                                    <option value="4">环</option>
                                    <option value="5">其他</option>
                                </select>
                            </li>

                            <li style="margin-left: 20px">
                                <a class="btn btn-primary btn-rounded btn-sm" id="search" onclick="$.table.search()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">

                <a class="btn btn-warning" onclick="$.table.exportExcel()">
                    <i class="fa fa-download"></i> 导出
                </a>

            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-suggest-js"/>
<th:block th:include="include :: bootstrap-typeahead-js"/>

<script th:inline="javascript">

    /* 模块前缀url */
    var prefix = ctx + "progressplan";

    /* 初始化方法 */
    $(function () {
        var progressId = [[${progressId}]];
        // 初始化列表
        initData(progressId);
    });

    /* 初始化 列表信息 */
    function initData(progressId) {
        var options = {
            uniqueId: "progressId",
            url: prefix + "/remarkList?progressId="+progressId,
            exportUrl: prefix + "/exportRemark?progressId="+progressId,
            pagination: true,
            modalName: "进度计划报表",
            columns: [
                {
                    field: 'reasonType',
                    align: 'center',
                    title: '类型',
                    width: "12%",
                },
                {
                    field: 'remark',
                    align: 'center',
                    title: '原因',
                }
            ]
        };
        $.table.init(options);
    }


</script>
</body>
</html>